import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("Flutter ICON"),
          backgroundColor: Colors.yellow,
        ),
        body: MyHomePage(),
      ),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return ListView(
      padding: const EdgeInsets.all(10),
      children: <Widget>[
        Container(
          height: 120,
          // width: 120, // 宽度是自适应的，设置没有效果
          decoration: const BoxDecoration(color: Colors.red),
        ),
        Container(
          height: 120,
          decoration: const BoxDecoration(color: Colors.yellow),
        ),
        Container(
          height: 120,
          decoration: const BoxDecoration(color: Colors.orange),
        ),
        Container(
          height: 120,
          decoration: const BoxDecoration(color: Colors.blue),
        ),
        Container(
          height: 120,
          decoration: const BoxDecoration(color: Colors.red),
        ),
        Container(
          height: 120,
          decoration: const BoxDecoration(color: Colors.pink),
        ),
        Container(
          height: 120,
          decoration: const BoxDecoration(color: Colors.blueGrey),
        ),
      ],
    );
  }
}
